<?php $this->load->view('left'); ?>

<h2>All Books</h2>
<br />
<br />
<br />
<br />
<?php
if(empty($page_result))
{
        echo "No Records";
}
else
{
         echo "<table>";
                echo "<tr><td>Type</td><td>App ID</td><td>Book Name</a></td><td>Author</td><td>Publisher</td><td>Pub Date</td><td>Price</td><td>Cover</td><td>Manage</td></tr>";
         foreach ($page_result as $msg)
         {
                 echo "<tr><td>";
                 if ($msg['sid'] == 0) {
                         echo "系列";
                 } else {
                         echo "单本";
                 }
                 echo "</td><td>".$msg['prod_id']."</td><td><a target=\"_blank\" href=\"".site_url('manage/get_book_message/'.$msg['b_id'])."\">".$msg['name']."</a></td><td>".$msg['author']."</td><td>".$msg['publisher']."</td><td>".$msg['pub_date']."</td><td>".$msg['price']."</td><td><img width='150px' height='150px' src=\"".base_url().$msg['pic']."\" /></td><td>"."<a href=\"".site_url('manage/edit_book/'.$msg['b_id'])."\">Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;"."<a href=\"".site_url('manage/del_book/index'.'/'.$start.'/'.$msg['b_id'])."\">Delete</a></td></tr>";
         }
}
?>
</table>
<?php echo $page_link;?>
<?php $this->load->view('right'); ?>
